package com.tianquan.event;/**
 * @author starsea
 * @date 2024-09-20 下午1:55
 */

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;

/**
 *@BelongsProject: uploaddemo
 *@BelongsPackage: com.tianquan.event
 *@Author: tianquan
 *@CreateTime: 2024-09-20  13:55
 *@Description: 测试
 *@Version: 1.0
 */

@Component
public class TestPublishEvent {

    @Autowired
    private ApplicationContext applicationContext;

    public void publishEvent(Email email){
        applicationContext.publishEvent(new TestEvent(this, email));
    }

}
